import {useTokenStore} from "@/Stores/token";
import request from '@/utils/request.js'
export const purchaseListService =(params)=>{
    const tokenStore = useTokenStore();
    return request.get('/purchase',{params:params})
}
export  const updatePurchaseService = (ProductModel)=>{
    return request.put('/purchase',ProductModel)
}
export  const AddPurchaseService = (ProductModel)=>{
    return request.post('/purchase',ProductModel,)
}
export const deletePurchaseService = (id)=>{
    return request.delete('/purchase?id='+id)
}

export const returnPurchaseService = (params) => {
    return request.post('/purchase/return1', params);
}
